package cn.js.sangu.unitStore.service.update;

import cn.js.sangu.unitStore.entity.UtilsEntity;
import cn.js.sangu.unitStore.common.exception.ServiceException;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.js.sangu.unitStore.mapper.UtilsMapper;
/**
 * 说明：抽取公共方法，用于更新UtilsEntity
 * 作者：linshuo
 */
@Service
public class UtilsUpdateService extends ServiceImpl<UtilsMapper, UtilsEntity> {

    public boolean updateUtilsEntity(UtilsEntity utilsEntity) {
        try {
            return super.updateById(utilsEntity);
        } catch (Exception e) {
            throw new ServiceException("Utils记录更新失败！请联系管理员");
        }
    }
}